1. Field of the Invention
The present invention related generally to non-volatile memory devices. More particular, the invention relates to a flash memory device capable of designating memory blocks in a lock state or a write-protection state.
2. Description of the Related Art
Flash memory is a common type of electronically erasable and programmable read only memory (EEPROM). Conventional flash memory is characterized by the use of a single transistor memory cell which enables high integration density of the constituent memory cells, excellent operating reliability, and relatively low power consumption. Due to these properties, flash memory has been increasingly used in low-power applications like those associated with portable electronic devices, such as personal digital assistant devices, digital cameras, cellular phones, MP3 players, etc.
Due to relatively easy software upgrading capabilities and good data storage capacity, both system program code (e.g., operating system code and/or application code) and system data (e.g., data files, music and pictures files, etc.) are often stored in flash memory. Where flash memory is used to store upgradeable (or patch-able) program code and/or critical system data, certain precautions must be taken to protect critical code and data from being inadvertently over-written (i.e., reprogrammed) or erased.
Older EEPROMs required a global erase and re-write to update stored code or data. Contemporary flash memory allows stored code or data to be block-erased, where the storage capacity provided by the flash memory is divided into blocks similar to disk sectors in a disk operating system. When a block-based architecture is used, instead of erasing the memory, selected one or more blocks of memory may be erased using a conventional file manager and/or a conventional memory manager. Using a block-based architecture, a number of memory blocks may be designated as erasable without restriction, while others may be erased (or over-write protected). For example, critical system code such as a system boot file may be stored in a protected memory block in a flash memory device. Other memory blocks may be allocated for the storage of other types of system code or data.
In order to ensure the integrity of a block-based flash memory device, there must be some sort of memory block protection scheme enabled during program and erase operations. That is, protected memory blocks in a flash memory must be safeguarded during operations having the potential to destroy critical system code or data. This is true regardless of which particular memory block is being accessed by the operation (i.e., a protected memory block or an accessible memory block). In certain applications, the preservation of critical system code and data in a protected memory block must also be addressed in counter-measures related to virus protection or software malfunctions.
One example of a system and method protecting stored data from being unintentionally over-written is disclosed, for example, in U.S. Pat. No. 6,209,069, the subject matter of which is hereby incorporated by reference.
FIG. 1 summarizes in relevant portion of this conventional system. Referring to FIG. 1, a block control circuit 206 includes a plurality of latches 301 through 30N corresponding one-for-one with a plurality of designated memory blocks BLOCK 1 through BLOCK N. Each latch 301 through 30N may be programmed with data indicating a lock state or a write state for the corresponding memory block BLOCK 1 through BLOCK N. Based on the data contents of the plurality of latches, respective block latch control signals are applied in relation to memory blocks in the flash memory array.
In the illustrated example of FIG. 1, the data contents of each latch 301 through 30N is determined in relation to a system reset signal, a group latch control signal, and respective block latch control signals, applied to reset (R), clocking, and data (D) inputs of the respective latches.
Where this type of conventional memory block protection scheme is used, upon host device power-up, the plurality of latches in block control circuit 206 is set/reset to indicate either the lock/write state for each memory block. Subsequent to this initialization process, user definitions or host device operations may alter the lock/write state of a memory block, and therefore the data contents of one or more of the plurality of latches. In this manner, the plurality of latches may be used as a scratch pad memory track or temporarily store the current lock/write state of the respective memory blocks. Unfortunately, such storage is volatile in nature and may be lost during an unexpected power down or functional interruption of the block control circuit. Additionally, data glitches may result in erroneous register entries (i.e., set/reset values being stored) upon power-up initialization.